package org.yogurtcat.server.commons.constant;

import lombok.Getter;
import lombok.Setter;

/**
 * 相应结果编码
 * @author heaven
 *
 */
public enum ResultCode {
	
	NORMAL(20000l, "正常响应"), 
	AUTH_FAIL(20001l, "认证失败"), 
	SYSTEM_ERROR(20002l, "系统异常"), 
	ACCESS_DENIED_ERROR(20003l, "无访问权限"),
	INPORT_ERROR(20004l, "文件%d行%d列数据不合法"),
	STORAGE_ERROR(20005l, "请配置存储方式"),
	NAME_EXITS_ERROR(20006l, "已存在此账户名，请更换账户名"),
	METHOD_ARGUMENT_NOT_VALID_ERROR(20007l, "方法校验失败"),
	ROLE_EXITS_ERROR(20006l, "已存在此角色名，请更换角色名");
	
	@Setter
	@Getter
	private Long code;
	
	@Setter
	@Getter
	private String message;
	
	ResultCode(Long code, String message) {
		this.setCode(code);
		this.setMessage(message);
	}
	
}
